const mongoose = require('mongoose');
const Schema = mongoose.Schema
const userSchema = new Schema({
    name: {
        type: String,
        required: true
    },
    email:{
        type:String,
        required:true
    },
    password:{
        type:String,
        required:true
    },
    date:{
        type:Date,
        default:Date.now
    },
    avatar:{
        type:String,
        required:true
    },
    identity:{
        type:String,
        required:true
    }
    
})

//创建模型，并把模型导出
module.exports =User = mongoose.model('users',userSchema)
